package com.le.tester.onjava8.l_2_1;

/**
 * createTime：2023/1/6 9:51
 * description：新建引用
 */
public class Aliasl2 {
    private int i;

    public Aliasl2(int i) {
        this.i = i;
    }

    public static void f(Aliasl2 reference) {
        reference.i++;
    }

    public static void main(String[] args) {
        Aliasl2 x = new Aliasl2(7);
        System.out.println("x: " + x.i);
        System.out.println("call f(x)");
        f(x);
        System.out.println("x: " + x.i);
    }
}
